package com.huawei.appmarket.component.feedback.activity;

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.huawei.appmarket.component.feedback.activity.FeedbackListDetailResponse.UserFeedBackEntity;
import huawei.widget.HwButton;
import java.util.List;
import o.dfh;
import o.dfj.a;
import o.dfj.b;

public class FeedbackListDetailFragment extends Fragment implements OnClickListener {
    private HwButton ˊ;
    private Context ˋ;
    private ViewGroup ˎ;
    private List<UserFeedBackEntity> ˏ;
    private RecyclerView ॱ;

    @SuppressLint({"ValidFragment"})
    public FeedbackListDetailFragment(List<UserFeedBackEntity> list) {
        this.ˏ = list;
    }

    public static FeedbackListDetailFragment ॱ(List<UserFeedBackEntity> list) {
        return new FeedbackListDetailFragment(list);
    }

    public void ˏ(Bundle bundle) {
        super.ˏ(bundle);
        this.ˋ = ॱˋ();
    }

    @Nullable
    public View ˋ(LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
        this.ˎ = (ViewGroup) layoutInflater.inflate(b.ˎ, viewGroup, false);
        this.ˊ = (HwButton) this.ˎ.findViewById(a.ᐝॱ);
        this.ˊ.setOnClickListener(this);
        this.ॱ = (RecyclerView) this.ˎ.findViewById(a.ˎ);
        this.ॱ.setAdapter(new dfh(this.ˋ, this.ˏ));
        this.ॱ.setLayoutManager(new LinearLayoutManager(this.ˋ));
        if (this.ˏ != null) {
            this.ॱ.ˏ(this.ˏ.size() - 1);
        }
        return this.ˎ;
    }

    public void onClick(View view) {
        if (view.getId() == a.ᐝॱ) {
            ॱˋ().finish();
        }
    }
}
